<!-- tiny_mce editor:INI -->
<script type="text/javascript" src="/javascripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
	mode : "textareas",
	theme : "advanced",
	theme_advanced_buttons1 : "bold,italic,underline,justifyleft,justifycenter,justifyright,justifyfull,undo,redo,formatselect",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
  theme_advanced_blockformats : "p,h3",
  theme_advanced_resizing : true,
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resize_horizontal : false
});
</script>
<!-- tiny_mce editor:END -->

<h2><label for="titulo">Titulo:</label> <br />
<%= f.text_field :titulo %></h2>

<script>
  $(document).ready(function(){
    $("#imagenes_item").sortable({});
  });
</script>

<div class="ficha_blog_imagen">
  <ul id="imagenes_item">
    <% @blog.imagenes.each do |imagen| %>
      <li id="imagen_item_<%= imagen.id %>">
        <%= link_to image_tag(imagen.public_filename(:mini)), imagen.public_filename %>
        <%= link_to 'quitar', '#', :onclick => "removeImagenLi( '#{imagen.id}' ); return false;", :class => "boton_borrar"%>
        <%= hidden_field_tag 'imagenes_ids[]', imagen.id %>
      </li>
    <% end %>
  </ul>
</div>

<div class="ficha_blog_texto">
  <label for="texto">Texto:</label> <br />
  <%= f.text_area :texto %>
  
  <br />
  
  <label for="estado">Estado:</label>
  <%= f.select :estado, { 'Publicado' => Blog::PUBLICADO, 'Borrador' => Blog::BORRADOR } %>
</div>

<div class="ficha_blog_estado">

</div>